<template>
    <div ref="chart" style="width: 100%;height: 238px;">

    </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  mounted () {
    this.initChart()
  },
  methods: {
    initChart () {
      const myChart = this.$echarts.init(this.$refs.chart);
      const option = {
        series: [
          {
            type: 'pie',
            data: [
              {
                value: 100,
                name: 'A'
              },
              {
                value: 200,
                name: 'B'
              },
              {
                value: 300,
                name: 'C'
              },
              {
                value: 400,
                name: 'D'
              },
              {
                value: 500,
                name: 'E'
              }
            ],
            roseType: 'area'
          }
        ]

      }
      myChart.setOption(option);
    }
  }
}
</script>
<style  scoped>

</style>
